package com.yn.yzq.service.impl;

import com.yn.yzq.dao.UserServiceMapper;
import com.yn.yzq.entity.User;
import com.yn.yzq.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    //注入
    @Autowired
    private UserServiceMapper userServiceMapper;

    @Override
    public User getUserInfo(String name) {
        User getUserInfo = userServiceMapper.getUserInfoByName(name);
        if (getUserInfo != null && !getUserInfo.equals("")) {
            return getUserInfo;
        } else {
            return null;
        }
    }
}
